package net.game.server.io.net;

import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;

public class Buffer {
    private int opcode;
    private ChannelBuffer buffer;
    
    public Buffer(int opcode) {
        this.opcode = opcode;
        buffer = ChannelBuffers.dynamicBuffer();
    }

    public Packet toPacket() {
        return new Packet(opcode, buffer);
    }
}
